# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gdk-pixbuf-xlib
pkgver=2.40.2
pkgrel=2
pkgdesc="Deprecated Xlib integration for GdkPixbuf"
arch=(x86_64)
url="https://gitlab.gnome.org/Archive/gdk-pixbuf-xlib"
license=(LGPL2.1)
depends=(gdk-pixbuf2 libx11)
makedepends=(gtk-doc git meson)
options=(debug)
_commit=c142b818801e0affceea4a2139cf5630a283e54e  # tags/2.40.2^0
source=("git+$url.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D gtk_doc=true
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  depends+=(libgdk_pixbuf-2.0.so)
  provides+=(libgdk_pixbuf_xlib-2.0.so)

  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
